package com.example.q_kang.hhh.order;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.base.BasePresenter;
import com.sskj.base.base.HttpData;
import com.sskj.base.bean.SellDaKuanListBean;
import com.example.q_kang.hhh.api.JsonConverter;

import java.util.List;

import io.reactivex.Flowable;


/**
 * @author Hey
 * Create at  2019/04/13
 */
class SellWaitDaKuanPresenter extends BasePresenter<SellWaitDaKuanFragment> {

    public Flowable<List<SellDaKuanListBean.SellDaKuanBean>> sellWaitDaKuan(int page) {
        return httpService.getSellWaitDaKuan(page)
                .tag(this)
                .converter(new JsonConverter<HttpData<SellDaKuanListBean>>() {
                })
                .adapt(new FlowableBody<>())
                .map(listHttpData -> listHttpData.getData().getList());
    }
}
